<%@page import="java.sql.Connection"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="com.connection.jdbconnection"%>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<body>
	<form>
		<%
    /*  String sid;
     String sname;
    String fname; 
     String dob;
     String address;
     String course;
     String issuedate;
     String validuntile */;
     
   Statement st ;
        ResultSet rs=null ;
        Connection con = null;
        String name=request.getParameter("name");
        String student_id []=request.getParameterValues("box");
         String sign=null;     
       if(student_id !=null){
			try {
				jdbconnection db=new jdbconnection();
				st=db.jdbConnection();
				int b=0;
				
				%>
				 <a href="javascript: window.print();">Print</a>
				<div style="margin-top: 20px;margin-bottom: 40px;width: 970px;height:1370px; border-style: groove; ">
				
				<%
				 String q="select * from adminprofile";   //Authorize Signature from AdminProfile table.
            System.out.println(q);
            ResultSet rs1=st.executeQuery(q);
            if(rs1.next())
            {
            sign=rs1.getString(5);
            }
				
				
			for (int j = 0; j < student_id.length; j++) {
				
            
         /* }
            int count=0;
            while(rs.next())
            { */
           
            
            
            String sql = "select * from studentform where student_id='"+ student_id[j]+ "'";
            System.out.println(sql);
            rs=st.executeQuery(sql);
             %>
		
		<% int i=1;          
                   
            while (rs.next()) {

                        String sid=rs.getString("student_id");
                         String sname=rs.getString("sname");
                        String fname=rs.getString("fname");
                        String dob=rs.getString("dob");
                        String gender=rs.getString("gender");
                        String address=rs.getString("address");
                        String contact=rs.getString("contact");
                        String photo=rs.getString("upload");
                        String emailid=rs.getString("emailid");
                        String course=rs.getString("course");
                        String issuedate=rs.getString("issuedate");
                        String validuntill=rs.getString("validuntile");
                        String batch=rs.getString("batch");
                   
                                            
                         
  
		 %>
			<div style="width: 470px; height: 320px; border-style:groove; float: left; margin-bottom: 10px; margin-left: 7px; margin-top: 8px;">

				<div style="width: 470px; height: 100px; " align="center" >
					<font color="blue"
						style="font-family: serif;font-style: normal;text-shadow: purple;font-size: 29px;width: 100%;"><b>HI-REL
							INFO GENESIS CENTRE <br>
					</b>
					</font> <font color="blue" style="font-size: 14px;">42/7 J.L.N.
						Road Tagore Town Alld. Phone:-0532-2467260, 9389116029<br>
					</font> <font color="blue" style="font-size: 14px">43/33 T. B.
						Sapru Marg, Civil Lines, Alld. Phone:-0532-2260035, 9307883434<br>
					</font> <font color="blue" style="font-size: 12px"><b>Accredited
							Centre</b><br>
					</font> <font color="blue" style="font-size: 14px; "><b>NIELIT
							(Formerly DOEACC Society) & PTU (Punjab Technical University)</b>
					</font>

				</div>
				<hr style="width: 460px;height: 1px; background-color:  blue">
				<div style="border-color: black;border: 2px;">
					<div
						style="width: 100px;height: 110px;border-style: groove;float: right;margin-right: 10px;"><img src="<%= photo %>" alt="image" style="width: 100px;height: 110px" /></div>
					<div style="float: left;margin-left:5px; width: 120px;border: 2px;">
						<font color="blue" style="font-size: 16px;"><b>
								Enrollment No:<br> Name:<br> Father's Name:<br>
								Course: <br> Address:<br><br/> Issue Date:<br> Valid
								Date:<br>
						</b> </font>



					</div>

					<div>

						<%=sid %><br>
						<%=sname %><br>
						<%=fname %> <br>
						<%=course %><font color="blue"
							style="font-size: 16px;float: none;"><b> &nbsp;&nbsp;&nbsp; Batch:</b>
						</font><%=batch %><br>
						 <%=address %><br>
						  <%=issuedate %><br>
						  <%=validuntill %><br>
						<font color="blue" style="float: right;margin-right: 5px;"><img src="<%= sign %>" alt="image" height="20px" width="100px"/><br><b>Auth.
								Signature</b>
						</font>
					</div>


				</div>
				

			</div>
		<%
		if(i==8)
		break;
		
		
		      i++;
		}
		
	
		}
		
		 %>
			
			</div>
			
			

		<%
		

	    }
	    
		catch (Exception e) {
		 e.printStackTrace();
		}
    
}    
     %>
 

			
			
			</form>
	


</body>
</html>
